# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
version: 0.4.7.2-alpha
git_hash: 'tor-[% c("version") %]'
git_url: https://git.torproject.org/tor.git
git_submodule: 1
gpg_keyring: tor.gpg
tag_gpg_id: 1

var:
  container:
    use_container: 1
  deps:
    - build-essential
    - automake
    - zip
    - unzip

targets:
  nightly:
    version: '[% c("abbrev") %]'
    git_hash: main
    tag_gpg_id: 0

  linux-i686:
    var:
      libpath: '/var/tmp/dist/[% c("var/compiler") %]/lib32'
      sort_deps: 0
      arch_deps:
        - libtool
        - zlib1g-dev:i386
        - hardening-wrapper
  linux-x86_64:
    var:
      libpath: '/var/tmp/dist/[% c("var/compiler") %]/lib64'
      arch_deps:
        - libtool
        - zlib1g-dev
        - hardening-wrapper
  linux-cross:
    var:
      libpath: '/var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/lib'
      container:
        use_container: 1
        suite: buster
        arch: amd64
      post_pkginst: |
        export DEBIAN_FRONTEND=noninteractive
        # The recommended packages produce a package conflict.
        apt-get -y install --no-install-suggests --no-install-recommends zlib1g-dev:[% c("var/arch_debian") %]
        apt-get -y install --no-install-suggests --no-install-recommends libgcc-8-dev:[% c("var/arch_debian") %]
        apt-get -y install --no-install-suggests --no-install-recommends libstdc++-8-dev:[% c("var/arch_debian") %]
        # TODO: Build gcc+stdlib from source.
      arch_deps:
        - libtool
  osx-x86_64:
    var:
      arch_deps:
        - faketime
  expert-bundle:
    var:
      expert_bundle: 1
      flag_mwindows: ''
  android:
    var:
      configure_opt_project: '--enable-android --enable-static-openssl --enable-static-libevent --enable-zstd --disable-tool-name-check --disable-system-torrc --disable-system-torrc'
      arch_deps:
        - libtinfo5

input_files:
  - project: container-image
  - name: openssl
    project: openssl
  - name: libevent
    project: libevent
  - name: zlib
    project: zlib
    enable: '[% c("var/windows") || c("var/android") %]'
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - name: gcc-host
    project: gcc
    enable: '[% c("var/linux-cross") %]'
    target:
      - '[% c("var/channel") %]'
      - 'torbrowser-linux-x86_64'
  - name: zstd
    project: zstd
    enable: '[% c("var/android") %]'
